/*
 * @Description: 
 * @Author: Aroma
 * @Date: 2024-09-20 11:29:50
 * @LastEditors: Aroma
 * @LastEditTime: 2024-09-20 16:28:43
 * @别瞎看: 你个无脑牛马
 */
public class Test02Animal2{
    public static void main(String[] args) {
        //父类引用指向子类对象（多态）
        Animal2 animal2=new Monkey("金",88,"金丝猴");//（多态）编译看左边、运行看右边
        animal2.eat();
        animal2.sleep();
        //接口的引用指向实现类的对象
        ICycleAble iCycleAble=new Monkey("黑",100,"金刚");
        iCycleAble.cycle();
        //类型转换 子类调用父类方法
        Monkey m=(Monkey)iCycleAble; 
        m.eat();
        m.sleep();
        m.jump();
    }  
}